package com.itheima.pojo;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import net.minidev.json.annotate.JsonIgnore;

import javax.swing.*;
import java.nio.channels.spi.SelectorProvider;
import java.time.LocalDateTime;
@Data
public class User {
    @NotNull
    private Integer id;//主键
    private String username;//用户名

    @JsonIgnore
    private String password;//密码


    @NotEmpty
    @Pattern(regexp = "^\\$(1,10)$")
    private String nickname;/*昵称*/


    @NotNull
    @Email
    private String email;/*邮箱*/
    private String userPic;/*的头像*/

    private LocalDateTime createTime;/*创建时间*/


    private LocalDateTime updateTime;/*更新时间*/

}
